Release 10.1A: OpenEdge Data Management:
SQL Reference


Return values for DatabaseMetaData

Applications call methods of the DatabaseMetaData class to retrieve details about the JDBC support provided by the OpenEdge™ SQL JDBC driver.

Table 62 lists each method of the DatabaseMetaData class and shows what the JDBC driver returns when an application calls the method. For details on the format and usage of each method, see the Java Core API documentation for your platform. Many of the methods return lists of information as an object of type ResultSet. Use the normal ResultSet methods, such as getString and getInt, to retrieve the data from the result sets.

Table 62: Return values for DatabaseMetaData methods
Method
Description
Returns
allProceduresAreCallable() 
Can all the procedures returned by getProcedures be called by the current user?
False 
allTablesAreSelectable() 
Can all the tables returned by getTable be SELECTed by the current user?
False 
dataDefinitionCausesTransactionCommi
t() 
Does a data definition statement within a transaction force the transaction to commit?
True 
dataDefinitionIgnoredInTransactions(
)  
Is a data definition statement within a transaction ignored?
False 
doesMaxRowSizeIncludeBlobs()  
Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY BLOBs?
False 
getBestRowIdentifier
(String, String, String, int, 
boolean)  
Gets a description of a table’s optimal set of columns that uniquely identifies a row.
(Result set)
getCatalogs()  
Gets the catalog names available in this database.
(Result set)
getCatalogSeparator() 
What is the separator between catalog and table names?
None
No catalogs
getCatalogTerm() 
What is the database vendor’s preferred term for catalog?
None
No catalogs
getColumnPrivileges
(String, String, String, String) 
Gets a description of the access rights for a table’s columns.
(Result set)
getColumns(String, String, String, 
String)  
Gets a description of table columns available in a catalog.
(Result set)
getCrossReference
(String, String, String, String, String, String)
Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describes how one table imports another’s key). This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
(Result set)
getDatabaseProductName()  
What is the name of this database product?
OPENEDGE 
getDatabaseProductVersion()  
What is the version of this database product?
10.0A1B 
getDefaultTransactionIsolation()  
What is the database’s default transaction isolation level? The values are defined in java.sql.Connection.
TRANSACTION_READ_COMMITTED 
getDriverMajorVersion() 
What is the version of this JDBC driver?
1 
getDriverMinorVersion()  
What is the minor version of this JDBC driver?
1000 
getDriverName()  
What is the name of this JDBC driver?
JDBC-PROGRESS
Windows:
JdbcProgress.dll
Solaris and Compaq Tru64:
libJdbcProgress.so
IBM AIX:
libJdbcProgress.a
Hewlett Packard:
libJdbcProgress.sl
getDriverVersion()  
What is the version of this JDBC driver?
1.1000 (03.60.0006)
getExportedKeys(String, String, 
String)  
Gets a description of the foreign key columns that reference a table’s primary key columns (the foreign keys exported by a table).
(Result set)
getExtraNameCharacters()  
Gets all the extra characters that can be used in unquoted identifier names (those beyond a–z, A–Z, 0–9 and _).
_”, “%
getIdentifierQuoteString ()  
What is the string used to quote SQL identifiers? This returns a space“ ” if identifier quoting is not supported.
“ ”
getImportedKeys(String, String, 
String)  
Gets a description of the primary key columns that reference a table’s foreign key columns (the primary keys imported by a table).
(Result set)
getIndexInfo
(String, String, String, boolean, 
boolean)  
Gets a description of a table’s indices and statistics.
(Result set)
getMaxBinaryLiteralLength()
How many hex characters can you have in an inline binary literal?
31995
getMaxCatalogNameLength()  
What is the maximum length of a catalog name?
None
No catalogs
getMaxCharLiteralLength()  
What is the maximum length for a character literal?
31995 
getMaxColumnNameLength()  
What is the limit on column name length?
32 
getMaxColumnsInGroupBy()  
What is the maximum number of columns in a GROUP BY clause?
499 
getMaxColumnsInIndex()  
What is the maximum number of columns allowed in an index?
16 
getMaxColumnsInOrderBy()  
What is the maximum number of columns in an ORDER BY clause?
0 
getMaxColumnsInSelect()  
What is the maximum number of columns in a SELECT list?
500 
getMaxColumnsInTable()  
What is the maximum number of columns in a table?
500 
getMaxConnections()  
How many active connections can we have at a time to this database?
0 
getMaxCursorNameLength() 
What is the maximum cursor name length?
18 
getMaxIndexLength()  
What is the maximum length of an index (in bytes)?
113 
getMaxProcedureNameLength()  
What is the maximum length of a procedure name?
32 
getMaxRowSize()  
What is the maximum length of a single row?
31,995 bytes
getMaxSchemaNameLength()  
What is the maximum length allowed for a schema name?
32 
getMaxStatementLength()  
What is the maximum length of an SQL statement?
131,000 
getMaxStatements()  
How many active statements can we have open at one time to this database?
100 
getMaxTableNameLength()  
What is the maximum length of a table name?
32 
getMaxTablesInSelect()  
What is the maximum number of tables in a SELECT?
250 
getMaxUserNameLength() 
What is the maximum length of a user name?
32 
getNumericFunctions()  
Gets a comma-separated list of math functions.
ABS, ACOS, ASIN, ATAN, 
ATAN2, CEILING, COS, 
DEGREES, EXP, FLOOR, 
LOG10, MOD, PI, POWER, 
RADIANS, RAND, ROUND, 
SIGN,SIN, SQRT, TAN 
getPrimaryKeys(String, String, 
String)  
Gets a description of a table’s primary key columns.
(Result set)
getProcedureColumns
(String, String, String, String) 
Get a description of a catalog’s stored procedure parameters and result columns.
(Result set)
getProcedures(String, String, 
String) 
Gets a description of stored procedures available in a catalog.
(Result set)
getProcedureTerm() 
What is the database vendor’s preferred term for procedure?
procedure
getSchemas() 
Gets the schema names available in this database.
(Result set)
getSchemaTerm() 
What is the database vendor’s preferred term for schema?
Owner
getSearchStringEscape() 
This is the string that can be used to escape ‘_’ or ‘%’ in the string pattern style catalog search parameters.
\
getSQLKeywords()  
Gets a comma-separated list of all a database’s SQL keywords that are NOT also SQL keywords.
See the OpenEdge SQL Reserved Words section for a complete list of reserved words.
getStringFunctions() 
Gets a comma-separated list of string functions.
ASCII, CHAR, CONCAT, 
DIFFERENCE,
INSERT, LCASE, LEFT, 
LENGTH, LOCATE, LOCATE-2, 
LTRIM, REPEAT, REPLACE, 
RIGHT, RTRIM, SPACE, 
SUBSTRING, UCASE  
getSystemFunctions() 
Gets a comma-separated list of system functions.
USERNAME, IFNULL, DBNAME 
getTablePrivileges(String, String, 
String)  
Gets a description of the access rights for each table available in a catalog.
(Result set)
getTables(String, String, String, 
String [])  
Gets a description of tables available in a catalog.
(Result set)
getTableTypes()  
Gets the table types available in this database.
(Result set)
getTimeDateFunctions()  
Gets a comma-separated list of time and date functions.
CURDATE, CURTIME, DAYNAME, 
DAYOFMONTH, DAYOFWEEK, 
DAYOFYEAR, MONTH, QUARTER, 
WEEK, YEAR, HOUR, MINUTE, 
SECOND, MONTHNAME, NOW, 
TIMESTAMPADD, 
TIMESTAMPDIFF 
getTypeInfo()  
Gets a description of all the standard SQL types supported by this database.
(Result set)
getURL()  
What is the URL for this database?
(The URL)
getUserName()  
What is our user name as known to the database?
(User name)
getVersionColumns(String, String, 
String) 
Gets a description of a table’s columns that are automatically updated when any value in a row is updated.
(Result set)
isCatalogAtStart() 
Does a catalog appear at the start of a qualified table name? Otherwise it appears at the end.
False 
isReadOnly()  
Is the database in read-only mode?
False 
nullPlusNonNullIsNull()  
Are concatenations between NULL and non-NULL values NULL? A JDBC-compliant driver always returns true.
True 
nullsAreSortedAtEnd() 
Are NULL values sorted at the end regardless of sort order?
False 
nullsAreSortedAtStart()
Are NULL values sorted at the start regardless of sort order?
False
nullsAreSortedHigh() 
Are NULL values sorted high?
True
nullsAreSortedLow() 
Are NULL values sorted low?
False
storesLowerCaseIdentifiers() 
Does the database treat mixed-case, unquoted SQL identifiers as case insensitive and store them in lowercase?
False
storesLowerCaseQuotedIdentifiers() 
Does the database treat mixed-case, quoted SQL identifiers as case insensitive and store them in lowercase?
False
storesMixedCaseIdentifiers()  
Does the database treat mixed-case, unquoted SQL identifiers as case insensitive and store them in mixed case?
False
storesMixedCaseQuotedIdentifiers() 
Does the database treat mixed-case, quoted SQL identifiers as case insensitive and store them in mixed case?
True
storesUpperCaseIdentifiers() 
Does the database treat mixed-case, unquoted SQL identifiers as case insensitive and store them in uppercase?
True
storesUpperCaseQuotedIdentifiers() 
Does the database treat mixed-case, quoted SQL identifiers as case insensitive and store them in uppercase?
False
supportsAlterTableWithAddColumn() 
Is ALTER TABLE with add column supported?
False
supportsAlterTableWithDropColumn() 
Is ALTER TABLE with drop column supported?
False 
supportsANSI92EntryLevelSQL() 
Is the ANSI92 entry level SQL grammar supported? All JDBC-compliant drivers must return true.
True 
supportsANSI92FullSQL() 
Is the ANSI92 full SQL grammar supported?
False 
supportsANSI92IntermediateSQL() 
Is the ANSI92 intermediate SQL grammar supported?
False 
supportsCatalogsInDataManipulation() 
Can a catalog name be used in a data manipulation statement?
False 
supportsCatalogsInIndexDefinitions() 
Can a catalog name be used in an index definition statement?
False 
supportsCatalogsInPrivilegeDefinitio
ns() 
Can a catalog name be used in a privilege definition statement?
False 
supportsCatalogsInProcedureCalls() 
Can a catalog name be used in a procedure call statement?
False 
supportsCatalogsInTableDefinitions() 
Can a catalog name be used in a table definition statement?
False 
supportsColumnAliasing()  
Is column aliasing supported? If so, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as required.
True 
supportsConvert() 
Is the CONVERT function between SQL types supported?
True
supportsConvert(int, int) 
Is CONVERT between the given SQL types supported?
True
supportsCoreSQLGrammar() 
Is the ODBC Core SQL grammar supported?
True
supportsCorrelatedSubqueries() 
Are correlated subqueries supported? A JDBC-compliant driver always returns true.
True
supportsDataDefinitionAndData
ManipulationTransactions () 
Are both data definition and data manipulation statements within a transaction supported?
True
supportsDataManipulationTransactions
Only()  
Are only data manipulation statements within a transaction supported?
False
supportsDifferentTableCorrelationNam
es()  
If table correlation names are supported, are they restricted to be different from the names of the tables?
True
supportsExpressionsInOrderBy()
Are expressions in ORDER BY lists supported?
True
supportsExtendedSQLGrammar()
Is the ODBC Extended SQL grammar supported?
True
supportsFullOuterJoins()
Are full nested outer joins supported?
False
supportsGroupBy()
Is some form of GROUP BY clause supported?
True
supportsGroupByBeyondSelect()
Can a GROUP BY clause add columns not in the SELECT provided it specifies all the columns in the SELECT?
True 
supportsGroupByUnrelated()
Can a GROUP BY clause 
use columns not in the 
SELECT?  
False 
supportsIntegrityEnhancementFacility()
Is the SQL Integrity Enhancement Facility supported?
True 
supportsLikeEscapeClause()
Is the escape character in LIKE clauses supported? A JDBC-compliant driver always returns true.
True 
supportsLimitedOuterJoins()
Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.)
False 
supportsMinimumSQLGrammar()
Is the ODBC Minimum SQL grammar supported? All JDBC-compliant drivers must return true.
True 
supportsMixedCaseIdentifiers()
Does the database treat mixed-case, unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-compliant driver will always return false.
False
supportsMixedCaseQuotedIdentifiers() 
Does the database treat mixed-case, quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-compliant driver will always return true.
True 
supportsMultipleResultSets() 
Are multiple ResultSets from a single execute supported?
False 
supportsMultipleTransactions() 
Can multiple transactions be open at once (on different connections)?
True 
supportsNonNullableColumns()  
Can columns be defined as non-nullable? A JDBC-compliant driver always returns true.
True 
supportsOpenCursorsAcrossCommit() 
Can cursors remain open across commits?
True 
supportsOpenCursorsAcrossRollback() 
Can cursors remain open across rollbacks?
True 
supportsOpenStatementsAcrossCommit() 
Can statements remain open across commits?
True 
supportsOpenStatementsAcrossRollback
() 
Can statements remain open across rollbacks?
True 
supportsOrderByUnrelated() 
Can an ORDER BY clause use columns not in the SELECT?
False 
supportsOuterJoins() 
Is some form of outer join supported?
True 
supportsPositionedDelete() 
Is positioned DELETE supported?
True 
supportsPositionedUpdate() 
Is positioned UPDATE supported?
True 
supportsSchemasInDataManipulation() 
Can a schema name be used in a data manipulation statement?
True 
supportsSchemasInIndexDefinitions() 
Can a schema name be used in an index definition statement?
True 
supportsSchemasInPrivilegeDefinition
s() 
Can a schema name be used in a privilege definition statement?
True 
supportsSchemasInProcedureCalls() 
Can a schema name be used in a procedure call statement?
True 
supportsSchemasInTableDefinitions() 
Can a schema name be used in a table definition statement?
True 
supportsSelectForUpdate()  
Is SELECT for UPDATE supported?
True 
supportsStoredProcedures() 
Are stored procedure calls using the stored procedure escape syntax supported?
True 
supportsSubqueriesInComparisons() 
Are subqueries in comparison expressions supported? A JDBC-compliant driver always returns true.
True 
supportsSubqueriesInExists() 
Are subqueries in EXISTS expressions supported? A JDBC-compliant driver always returns true.
True 
supportsSubqueriesInIns() 
Are subqueries in IN statements supported? A JDBC-compliant driver always returns true.
True 
supportsSubqueriesInQuantifieds() 
Are subqueries in quantified expressions supported? A JDBC-compliant driver always returns true.
True 
supportsTableCorrelationNames() 
Are table correlation names supported? A JDBC-compliant driver always returns true.
True 
supportsTransactionIsolationLevel(in
t) 
Does the database support the given transaction isolation level?
True (for all four transaction levels)
supportsTransactions () 
Are transactions supported? If not, commit is a no-op and the isolation level is TRANSACTION_NONE.
True 
supportsUnion() 
Is SQL UNION supported?
True 
supportsUnionAll() 
Is SQL UNION ALL supported?
True 
usesLocalFilePerTable() 
Does the database use a file for each table?
False 
usesLocalFiles() 
Does the database store tables in a local file?
False 

Example

The following example is a code segment that illustrates calling methods of DatabaseMetadata:

 Connection con = DriverManager.getConnection ( url, prop);

                               .
                               .
                               .

            // Get the DatabaseMetaData object and display
            // some information about the connection
            
            DatabaseMetaData dma = con.getMetaData ();

            o.println("\nConnected to " + dma.getURL());
            o.println("Driver       " + 
            						dma.getDriverName());
            o.println("Version      " +
             						dma.getDriverVersion()); 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095